//
//  GoodListDataManger.m
//  DoneTask
//
//  Created by mac on 16/7/31.
//  Copyright © 2016年 Mr-yuwei. All rights reserved.
//

#import "GoodListDataManger.h"
#import "NetWorkRequest.h"

static  NSString *firstLaunchcreateIfNotExist =@"device/createIfNotExist";//设备创建如果不存在
static  NSString *systemConfig = @"systemConfig/queryDetail";// 系统配置查询详情
static  NSString *uploadTaskList = @"dianjoy/uploadTaskList";// 系统配置查询详情
static  NSString *JPushRegistrationID = @"dianjoy/uploadJPushRegistrationID";// 系统配置查询详情



@implementation GoodListDataManger

+(void)netWorkGetWithDataType:(NetworkDataType)type parameters:(NSDictionary*)parameters SuccessBlock:(void(^)(NSDictionary*dic))successBlock{
    
    NSString *url=nil;
    switch (type)
    {
        case NetworkDatalaunchType:
            url=firstLaunchcreateIfNotExist;
            break;
        case NetworkDatasystemOpentype:
           url=systemConfig;
            break;
        case NetworkDatauploadTaskList:
            url=uploadTaskList;
            break;
        case NetworkDataTokenID:
            url=JPushRegistrationID;
            break;
        default:
            break;
    }
    [NetWorkRequest netWorkPOSTWithURLString:url parameters:parameters SuccessBlock:^(NSDictionary *dic)
    {
       successBlock(dic);
        
    } failBlock:^(NSError *error)
    {
    
        
        
    }];
    
}

@end
